how to determine the sum of a series